﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Special_add.aspx.cs" Inherits="manage_channel_Special_add" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<link href="../../sysImages/<%Response.Write(NetCMS.Config.UIConfig.CssPath());%>/css/css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Public.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <table id="top1" width="100%"  border="0" cellpadding="0" cellspacing="0" class="toptable">
        <tr>
          <td height="1" colspan="2"></td>
        </tr>
        <tr>
          <td width="57%" class="sysmain_navi" style="padding-left:14px;">添加/修改频道专题</td>
          <td width="43%">位置导航：<a href="../main.aspx" class="list_link" target="sys_main">首页</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" /><a href="list.aspx" class="list_link" target="sys_main">频道列表</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" /><a href="special_list.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>" class="list_link" target="sys_main">专题列表</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" />添加/修改频道专题</td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
      <tr class="TR_BG_list">
        <td style="text-align:right;width:22%">所属于频道</td>
        <td >
         <span id="ChannelName" class="reshow" runat="server" width="280px"></span>
       </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">父专题</td>
        <td >
            <asp:HiddenField ID="ParanetID" runat="server" />
            <asp:HiddenField ID="gSpecialID" runat="server" />
            <asp:HiddenField ID="gAction" runat="server" />
            <span id="gParentID" class="reshow" runat="server" width="280px"></span>
            <span class="helpstyle" style="cursor:help;" title="点击显示帮助" onclick="Help('H_SpecialAdd_003',this)">帮助</span>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">中文名称</td>
        <td >
            <asp:TextBox ID="specialCName" onChange="javascript:GetPY1(this);" CssClass="form" MaxLength="100" Width="300px" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="f_specialCName" runat="server" ControlToValidate="specialCName" Display="Dynamic" ErrorMessage="<span class='reshow'>请填写中文名称</span>"></asp:RequiredFieldValidator>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">英文名称</td>
        <td >
            <asp:TextBox ID="specialEName" CssClass="form" MaxLength="100" Width="300px" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="specialEName" Display="Dynamic" ErrorMessage="<span class='reshow'>请填写英文名称</span>"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="specialEName"  Display="Dynamic" ErrorMessage="<span class='reshow'>只能为数字或者字母.第一个必须为字母,长度：3-18位</span>" ValidationExpression="^[a-zA-Z][a-zA-Z0-9_]{2,18}"></asp:RegularExpressionValidator>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">捆绑域名</td>
        <td >
            <asp:TextBox ID="binddomain" CssClass="form" MaxLength="100" Width="300px" runat="server"></asp:TextBox>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">导读</td>
        <td >
            <asp:TextBox ID="navicontent" CssClass="form" MaxLength="200" TextMode="MultiLine" Height="100px" Width="350px" runat="server"></asp:TextBox>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">保存路径(静态)</td>
        <td >
            <asp:TextBox ID="savePath" CssClass="form" MaxLength="100" Width="300px" Text="/{@dirHtml}/<%Response.Write(gChannelEName); %>/special" runat="server"></asp:TextBox>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">保存文件(静态，包括扩展名)</td>
        <td >
            <asp:TextBox ID="filename" CssClass="form" MaxLength="100" Width="300px" runat="server"></asp:TextBox>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">模板目录</td>
        <td >
            <asp:TextBox ID="templet" CssClass="form" MaxLength="200" Width="300px" runat="server"></asp:TextBox><img src="../../sysImages/folder/s.gif" alt="选择栏目模板" border="0" style="cursor:pointer;" onclick="selectFile('templet',document.form1.templet,280,500);document.form1.templet.focus();" />
        </td>
      </tr>      
      <tr class="TR_BG_list">
        <td style="text-align:right;">图片地址</td>
        <td >
            <asp:TextBox ID="PicURL" CssClass="form" MaxLength="200" Width="300px" runat="server"></asp:TextBox><img src="../../sysImages/folder/s.gif" alt="选取图片地址" border="0" style="cursor:pointer;" onclick="selectFile('pic',document.form1.PicURL,280,500);document.form1.PicURL.focus();" />
        </td>
      </tr>      
      <tr class="TR_BG_list">
        <td style="text-align:right;">是否锁定</td>
        <td >
            <asp:CheckBox ID="isLock" runat="server" />
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">专题推荐</td>
        <td >
            <asp:CheckBox ID="isRec" runat="server" />
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">权重</td>
        <td >
            <asp:TextBox ID="OrderID" CssClass="form" MaxLength="2" Width="300px" runat="server">0</asp:TextBox>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;"></td>
        <td >
         <asp:Button ID="Button1" runat="server" Text="保存专题" OnClick="Button1_Click" />
         <input type="reset" value="重新填写" />
        </td>
      </tr>
      </table>
    <br />
    <br />
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="copyright_bg" style="height: 76px">
       <tr>
         <td align="center"><label id="copyright" runat="server" /></td>
       </tr>
    </table>
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
function GetPY1(obj)
{
    if(document.getElementById("gSpecialID")!='')
    {
        var s = obj.value.trim();
        if(s != '')
        {
            document.getElementById('specialEName').value = GetPY(s);
        }
    }
}
new Form.Element.Observer($('specialEName'),1,classEName_1);
	function classEName_1()
		{
			if ($('specialEName').value=='')
			{
				$('filename').value='index.html'
			}
			else
			{
			    $('filename').value=document.getElementById("specialEName").value+'/index.html';
			}
		} 
</script>